#!/bin/sh
# This regression test is a part of SIPp.
# A call gives its -tdmmap circuit back when it ends: with two circuits
# and one call at a time, no call finds them all busy.
. "`dirname "$0"`/../functions"; init

sippbg -sn uas -i 127.0.0.1 -p 5099 -m 10
sippfg -sn uac -i 127.0.0.1 -p 5070 127.0.0.1:5099 -m 10 -l 1 -r 10 \
    -d 10 -tdmmap '{0-0}{1}{0-0}{0-1}' >/dev/null 2>&1
status=$?

if test $status -ne 0; then
    fail "the calls failed with $status"
else
    ok
fi
